package com.shushan.mixedexam.bean;

import com.android.net.bean.NetBaseBean;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * @ClassName: NewTypeOptionBean
 * @Desciption: //新题型选项bean
 * @author: zhangshihao
 * @date: 2018-07-24
 */
public class NewTypeOptionBean extends NetBaseBean {

    public int id;
    public int exercises_id;
    public String option_content;
    public int option_result;

    private int answerIndex = -1;

    @Override
    public void initByJson(JSONObject jsonObject) throws JSONException {
        if(jsonObject == null){
            return;
        }
        id = jsonObject.optInt("id",0);
        exercises_id = jsonObject.optInt("exercises_id",0);
        option_content = jsonObject.optString("option_content","");
        option_result = jsonObject.optInt("option_result",0);
    }

    public int getAnswerIndex() {
        return answerIndex;
    }

    public void setAnswerIndex(int answerIndex) {
        this.answerIndex = answerIndex;
    }
}
